<div class="articles index">
	<h2><?php __('Artículos Inactivos');?></h2>
	<table cellpadding="0" cellspacing="0">
	<tr>
<!--			<th><?php echo $this->Paginator->sort('Id','id');?></th>-->
			<th><?php echo $this->Paginator->sort('Marca','mark');?></th>
			<th><?php echo $this->Paginator->sort('Modelo','model');?></th>
			<th><?php echo $this->Paginator->sort('Código','code');?></th>
			<th><?php echo $this->Paginator->sort('Estilo','style');?></th>
			<th><?php echo $this->Paginator->sort('Material','material');?></th>
<!--			<th><?php echo $this->Paginator->sort('Cabezal','head');?></th>-->
<!--			<th><?php echo $this->Paginator->sort('Detalle','detail');?></th>-->
			<th><?php echo $this->Paginator->sort('Precio','price');?></th>
			<th><?php echo $this->Paginator->sort('Stock','amount_available');?></th>
			<th><?php echo $this->Paginator->sort('Min Stock','min');?></th>
			<th><?php echo $this->Paginator->sort('Fecha de Baja','termination_date');?></th>
			<th><?php echo $this->Paginator->sort('Tipo','type_id');?></th>
<!--                        <th><?php echo $this->Paginator->sort('Imagen','image');?></th>-->
			<th class="actions"><?php __('Opciones');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($articles as $article):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
<!--		<td><?php echo $article['Article']['id']; ?>&nbsp;</td>-->
		<td><?php echo $article['Article']['mark']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['model']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['code']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['style']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['material']; ?>&nbsp;</td>
<!--		<td><?php echo $article['Article']['head']; ?>&nbsp;</td>-->
<!--		<td><?php echo $article['Article']['detail']; ?>&nbsp;</td>-->
		<td><?php echo $article['Article']['price']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['amount_available']; ?>&nbsp;</td>
		<td><?php echo $article['Article']['min']; ?>&nbsp;</td>
		<td><?php
                $fecha = date('d/m/Y', strtotime($article['Article']['termination_date']));
                echo $fecha;?>&nbsp;</td>
                <td>
			<?php echo $this->Html->link($article['Type']['name'], array('controller' => 'types', 'action' => 'view', $article['Type']['id'])); ?>
		</td>
<!--		<td><?php echo $article['Article']['image']; ?>&nbsp;</td>-->
		<td class="actions">
			<?php echo $this->Html->link(__('Ver', true), array('action' => 'view', $article['Article']['id'])); ?>
			<?php echo $this->Html->link(__('Deshacer Baja', true), array('action' => 'deshacer_baja', $article['Article']['id'])); ?>
                        <?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $article['Article']['id']), null, sprintf(__('Esta seguro que desea eliminar el artículo # %s?', true), $article['Article']['mark'] . '-' . $article['Article']['model'])); ?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Página %page% de %pages%, mostrando %current% registros de %count% en total, a partir del registro %start%, terminando en el %end%', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('anterior', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('siguiente', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
</div>
<!--<div class="actions  specific">
	<h3><?php __('Opciones'); ?></h3>
	<ul>
                <li><?php echo $this->Html->link(__('Eliminar', true), array('action' => 'delete', $this->Form->value('Article.id')), null, sprintf(__('Are you sure you want to delete # %s?', true), $this->Form->value('Article.id'))); ?></li>
		<li><?php echo $this->Html->link(__('New Article', true), array('action' => 'add')); ?></li>
                <li><?php echo $this->Html->link(__('List Articles', true), array('controller' => 'articles', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('List Types', true), array('controller' => 'types', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Type', true), array('controller' => 'types', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Items', true), array('controller' => 'items', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Item', true), array('controller' => 'items', 'action' => 'add')); ?> </li>
		<li><?php echo $this->Html->link(__('List Purchases', true), array('controller' => 'purchases', 'action' => 'index')); ?> </li>
		<li><?php echo $this->Html->link(__('New Purchase', true), array('controller' => 'purchases', 'action' => 'add')); ?> </li>
	</ul>
</div>-->